package com.adopapa.nezhacloud.ddd.codegen;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 代码注解
 */

@Target({ ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface CodeGen {
	
	public final static String QUERY_EQUAL = "=";
	public final static String QUERY_LIKE = "%";
	public final static String QUERY_GREATERTHEN = ">";
	public final static String QUERY_LESSTHEN = ">";
	public final static String QUERY_GREATERTHEN_EQUAL = ">=";
	public final static String QUERY_LESSTHEN_EQUAL = "<=";
	
	public final static String TYPE_STRING = "String";
	public final static String TYPE_ENUM = "Enum";
	public final static String TYPE_CLASS = "Class";
	
	// 是否表单传值
	boolean form() default false;

	// 查询方式
	String query() default "="; // = % > < >= <=

	// 是否时间
	boolean time() default false;

	// bigDecimal
	boolean math() default false;

	// 是否唯一
	boolean unique() default false;

	// 标题
	String label() default "";

	String value() default "''";

	// 是否必须
	boolean required() default false;

	// 字段类型
	String type() default "String"; //Enum Double Instant Class
}
